<template>
	<div style="margin-top: 20px;">
		<el-table :data="tableData" style="width: 100%" stripe highlight-current-row>
			<el-table-column label="固定icon" width="370" prop="icon" align="center"></el-table-column>
			<el-table-column label="公告名称" width="370" prop="title" align="center"></el-table-column>
			<el-table-column label="发布时间" width="370" prop="createTime" align="center"></el-table-column>
			<el-table-column label="操作" align="center">
				<template slot-scope="scope">
					<el-button size="mini" @click="ckxq(scope.row)" type="primary">查看详情</el-button>
				</template>
			</el-table-column>
		</el-table>
	</div>
</template>

<script>
  import {ptdtlist} from '@/api/rw.js'
	export default {
		data() {
			return {
				xgone: {},
				dialogFormVisible: false,
				tableData: [],
				form: {
					gd: '',
					ggmc: '',
					fbsj: ''
				},
				formLabelWidth: '120px'
			}
		},
    methods:{
      ckxq(i){
        this.$router.push({
          path:"/system/xq",
          query:{
            icon:i.icon
          }
        })
      }
    },
		async mounted(){
			// 写接口
			let r = await ptdtlist()
			console.log(r);
			this.tableData = r.data
		}
	}
</script>

<style>
</style>
